﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Go.Tools;
using Go.Model;

namespace tpGo
{
    class Parser
    {
        private Dictionary<Coordinate_socket, Position> boardSocket;


        public struct Coordinate_socket
        {
            public String x;
            public int y;
        }

        public static Dictionary<Coordinate_socket, Position> crearCoordSocket(int size)
        {
            Dictionary<Coordinate_socket, Position> tableroSocket = createPosiciones(size);
            return tableroSocket;
        }

        private static Dictionary<Coordinate_socket, Position> createPosiciones(int size)
        {
            Dictionary<Coordinate_socket, Position> board = new Dictionary<Coordinate_socket, Position>();
            for (int row = 0; row < size; row++)
            {
                for (int column = 0; column < size; column++)
                {
                    //diccionario [i]= AsciiToCharacter (i+64)
                    //Position Position = Functions.getCoordinate(row, column);
                    //Coordinate_socket aNewCoordenada = new Coordinate(Position);
                    //board.Add(Position, aNewCoordenada);
                }
            }
            return board;
        }

        public void parser(String msje)
        {
            int size = 9;
           this.boardSocket = crearCoordSocket(size);
        }

        public String parserSendSocket(Position lastPlayed, Color color)
        {
            String mensaje_enviado = "";
            String comando = "play";
            return mensaje_enviado;
       }

        public Position parserReceiveSocket(String mensaje)
        {
            Coordinate _coordinate = new Coordinate();
            Position posicion = new Position(_coordinate);
            return posicion;
        }
    }
}
